home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Environments
/
PowerLisp 2.01
/
PowerLisp 2.01 ƒ
/
Library
/
describe.lisp
< prev
next >
Wrap
Lisp/Scheme
|
1996-05-17
|
2KB
|
57 lines
;;;
;;; PowerLisp 2.0
;;; Copyright © 1996 Roger Corman. All rights reserved.
;;; 68k Assembler source
;;;
;
; File: describe.lisp
; Contents: describe implementation for PowerLisp.
;
(in-package :common-lisp)
(provide :describe)
(defun %describe (obj &optional (stream *standard-output*))
(typecase obj
(symbol (describe-symbol obj stream))
(cons (describe-cons obj stream))
(package (describe-package obj stream))
(t (format stream
"Sorry, no information available for: ~A" obj))))
(defun describe-symbol (obj stream &aux value-list)
(setq value-list (%symbol-value-stack obj))
(format stream "~%Symbol: ~A~%" obj)
(format stream "Print name: ~A~%" (symbol-name obj))
(format stream "Value: ~A~%" (car value-list))
(format stream "Dynamic values stack: ~A~%" value-list)
(format stream "Package: ~A~%" (symbol-package obj))
(format stream "Property list: ~A~%" (symbol-plist obj))
(format stream "Function: ~A~%" (symbol-function obj))
(format stream "Constant flag: ~A~%" (if (constantp obj) t nil)))
(defun describe-cons (obj stream)
(format stream "~%Cons cell:~%")
(format stream "Car: ~A~%" (car obj))
(format stream "Cdr: ~A~%" (cdr obj)))
(defun describe-package (obj stream)
(format stream "~%Package:~%")
(format stream "Name: ~A~%" (package-name obj))
(format stream "Nicknames: ~A~%" (package-nicknames obj))
(format stream "Use list: ~A~%" (package-use-list obj))
(format stream "Used by list: ~A~%" (package-used-by-list obj))
(format stream "Shadowing symbols: ~A~%" (package-shadowing-symbols obj)))